import request from '@/axios'

/**
 * 上传文件
 * file = 文件流
 * path = 文件名
 */
export const upload = (data): Promise<IResponse> => {
  return request.post({ url: '/admin-api/infra/file/upload', data })
}

/**
 * 修改密码
 */
export const updatePassword = (data): Promise<IResponse> => {
  return request.post({ url: '/admin-api/system/baseInfo/updatePassword', data })
}

/**
 * 我的待办
 */
export const getTodoList = (params): Promise<IResponse> => {
  return request.get({ url: '/level-manage/todo/list', params })
}

/**
 * 通知公告
 */
export const getNoticePage = (params): Promise<IResponse> => {
  return request.get({ url: '/admin-api/system/notify-message/list', params })
}

/**
 * 通知公告 - 阅读状态为已读
 */
export const updateNoticeRead = (params): Promise<IResponse> => {
  return request.put({ url: '/admin-api/system/notify-message/update-read', params })
}
